import { extend } from "vee-validate"
import { phoneReg, passwordReg } from "./regs"
import { required } from "vee-validate/dist/rules"

extend("phone", {
  validate(val) {
    return phoneReg.test(val)
  },
  message: "手机号不合法",
})
extend("required", {
  ...required,
  message: "请输入内容",
})
extend("password", {
  validate(val) {
    return passwordReg.test(val)
  },
  message: "密码不合法",
})
